package com.hxw.schema.decorator;

/**
 * Created by Think on 2018/5/4.
 */
public class Client {
    public static void main(String[] args) {
        //人
        Person person = new Person("wen");
        TShirts tShirts = new TShirts();
        BigTrouser bigTrouser = new BigTrouser();
        tShirts.decorate(person);
        bigTrouser.decorate(tShirts);
        bigTrouser.show();
        //猪
        Pig pig = new Pig();
        Sneakers sneakers = new Sneakers();
        Leggings leggings = new Leggings();
        sneakers.decorate(pig);
        leggings.decorate(sneakers);
        leggings.show();
    }
}
